package com.zlyx.easy.access.accesser;

import java.util.List;

import com.zlyx.easy.access.accesser.provider.AccessSqlProvider;
import com.zlyx.easy.access.annotations.Accesser;
import com.zlyx.easy.access.defaults.annotations.SQLProvider;
import com.zlyx.easy.core.annotations.Desc;

/**
 * @Auth 赵光
 * @Describle
 * @2019年1月13日 下午5:43:31
 */
@Accesser(todo = { "数据交互通用访问接口" })
public interface AccessAccesser {

	@Desc("分页")
	@SQLProvider(method = AccessSqlProvider.PAGE, type = AccessSqlProvider.class)
	public List<?> page(String sql, int pageSize, int pageNum);

	@Desc("查询")
	@SQLProvider(method = AccessSqlProvider.SQL, type = AccessSqlProvider.class)
	public List<?> select(String sql);

	@Desc("查询")
	@SQLProvider(method = AccessSqlProvider.SQL, type = AccessSqlProvider.class)
	public Object selectOne(String sql);

	@Desc("更新")
	@SQLProvider(method = AccessSqlProvider.SQL, type = AccessSqlProvider.class)
	public int update(String sql);

	@Desc("删除")
	@SQLProvider(method = AccessSqlProvider.SQL, type = AccessSqlProvider.class)
	public int delete(String sql);

	@Desc("新增")
	@SQLProvider(method = AccessSqlProvider.SQL, type = AccessSqlProvider.class)
	public int insert(String sql);
}
